/**
 * Created by Administrator on 2017/9/4.
 */
function $(id) {
    return document.getElementById(id);
}
var js_box=$("js_box");
var slider_main_block=$("slider_main_block");
var imgs=slider_main_block.children;
var slider_ctrl=$("slider_ctrl");
for(var i=0;i<imgs.length;i++){
    var span=document.createElement("span");
    span.className = "slider-ctrl-con";
    span.innerHTML=imgs.length-i;
    slider_ctrl.insertBefore(span,slider_ctrl.children[1]);
}
// 遍历按钮
var iNow=0;
for(var k in spans){
    spans[k].onclick=function () {
        if(this.className="slider-ctrl-prev"){

        }
    }
}